<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="p" uri="/WEB-INF/tld/page.tld"%>
<table class="table responsive-table" id="sorting-example1">
	<thead>
		<tr>
			<th scope="col">项目名</th>
			<th scope="col">创建人</th>
			<th scopr="col">状态</th>
			<th scope="col">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${projectPage.list }" var="project">
		<tr>
			<td>${project.name }</td>
			<td>${project.user_name }</td>
			<td>${project.status_display }</td>
			<td class="low-padding">
				<span class="button-group compact">
					<c:choose>
						<c:when test="${sessionScope.currentUser.type eq 0 }">
							<a href="javascript:;" class="button" onclick='delProject("${project.id}", "${project.status }")'>删除</a>
						</c:when>
						<c:when test="${project.status eq 1 }">
							<a href="javascript:;" class="button" onclick='proAudit("${project.id}")'>项目审批</a>
						</c:when>
						<c:when test="${project.status eq 4 }">
							<a href="javascript:;" class="button" onclick='teamAudit("${project.id}")'>团队审批</a>
						</c:when>
						<c:when test="${project.status eq 6 or project.status eq 7 }">
							<a href="javascript:;" class="button" onclick='processView("${project.id}")'>查看进度</a>
						</c:when>
					</c:choose>
				</span>
			</td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<div class="dataTables_footer">
	<div class="dataTables_info" id="sorting-advanced_info">
		第${projectPage.pageNumber }/${projectPage.totalPage }页,共${projectPage.totalRow }条记录
</div>
<p:page totalRow="${projectPage.totalRow }" pageNumber="${projectPage.pageNumber }" 
	totalPage="${projectPage.totalPage }"/>
</div>